package fr.vahren.dotastrat.gui;

import com.trolltech.qt.gui.QVBoxLayout;
import com.trolltech.qt.gui.QWidget;

import fr.vahren.dotastrat.model.D2SHeroUnit;
import fr.vahren.dotastrat.model.D2SPlayer;

public class D2STeamStatusWidget extends D2SDockWidget {

	public D2STeamStatusWidget() {

		QWidget widget = new QWidget();
		widget.setLayout(new QVBoxLayout());
		setWidget(widget);
	}

	public void updatePlayerUnits(D2SPlayer player) {
		// clear
		QWidget widget = new QWidget();
		widget.setLayout(new QVBoxLayout());
		setWidget(widget);

		for (D2SHeroUnit unit : player.getControlledUnits()) {
			widget().layout().addWidget(new D2SHeroInfoWidget(unit));
		}
	}

	@Override
	public void writeTextToStatus() {
		// TODO Auto-generated method stub

	}

}
